package com.gz.common;

import com.gz.common.model.Coupon;


public class CouponService {
    private static CouponService service;

    private CouponService() {
    }

    public static CouponService getService() {
        if (service == null) {
            service = new CouponService();
        }
        return service;
    }

    public Coupon getCoupon() {
        Coupon coupon = Coupon.dao.findFirst("select * from tb_coupon where name<>'新人红包' order by id desc");
        return coupon;
    }

    public Coupon getNewUserCoupon() {
        Coupon coupon = Coupon.dao.findFirst("select * from tb_coupon where name='新人红包' order by id desc");
        return coupon;
    }
}
